﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.vb" Inherits="Testing.Details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .style3
        {
            width: 60px;
            height: 38px;
        }
        .style4
        {
            width: 179px;
            height: 38px;
        }
        .style5
        {
            height: 38px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
    <ItemTemplate>
        <table style="width: 100%;">
            <tr class="_repeater_Table">
                <td >
                    Cover Picture  
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("B_Picture") %>' Height="200px" Width="150px" />
                </td>
            </tr>
            <tr class="_repeater_Table">
                <td>
                    Book Name  
                </td>
                <td>
                    :
                </td>
                <td>
                    <%# Eval("B_Name")%>
                </td>
            </tr>
            <tr class="_repeater_Table">
                <td>
                    Author 
                </td>
                <td>
                    :
                </td>
                <td>
                    <%# Eval("B_Author")%>
                </td>
            </tr>
            <tr class="_repeater_Table">
                <td>
                    ISBN
                </td>
                <td>
                    :
                </td>
                <td>
                    <%# Eval("B_ISBN")%>
                </td>
            </tr>
            <tr class="_repeater_Table">
                <td>
                    Price
                </td>
                <td>
                    :
                </td>
                <td>
                    <%# Eval("B_Price")%><br />
                </td>
            </tr>
            <tr class="_repeater_Table">
                <td>
                    Description
                </td>
                <td>
                    :
                </td>
                <td align="justify">
                    <%# Eval("B_Description")%><br />
                </td>
            </tr>
        </table>
    </ItemTemplate>
    </asp:Repeater>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DBConnString %>" 
        ProviderName="<%$ ConnectionStrings:DBConnString.ProviderName %>" 
        
        SelectCommand="SELECT [ID], [B_Name], [B_Author], [B_ISBN], [B_Price], [B_Picture], [B_Description] FROM [Books] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:Image ID="img_like" runat="server" ImageUrl="~/BookCovers/like.png" />
    <asp:Image ID="img_unlike" runat="server" ImageUrl="~/BookCovers/unlike.png" />
    <asp:Label ID="lbl_like_unlike_message" runat="server"></asp:Label>
    <br />
    <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
        RepeatDirection="Horizontal">
        <asp:ListItem Value="1">Like</asp:ListItem>
        <asp:ListItem Value="0">Unlike</asp:ListItem>
    </asp:RadioButtonList>
    <asp:Button ID="btn_submit" runat="server" Text="Submit" />
        <table style="width: 100%;">
            <tr>
                <td style="background-color:#69E0DD" class="style3">
                    &nbsp;
                Rating :</td>
                <td align="center" bgcolor="#69E0DD" class="style4" valign="middle">
                    <asp:Label ID="lbl_r_by_u" runat="server" Font-Bold="True" Font-Size="Small" 
                        ForeColor="White"></asp:Label>
                    &nbsp;
                <asp:RadioButtonList ID="rbl_rating" runat="server" 
            RepeatDirection="Horizontal">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
            <asp:ListItem>3</asp:ListItem>
            <asp:ListItem>4</asp:ListItem>
            <asp:ListItem>5</asp:ListItem>
        </asp:RadioButtonList>
                </td>
                <td bgcolor="#CCCCCC" class="style5">
                    &nbsp;&nbsp;&nbsp;&nbsp; Average Rating for this Article :
                    <asp:Label ID="lbl_Avg_Rating" runat="server" Font-Bold="True" 
                        ForeColor="#6600FF"></asp:Label>
                    <br />
&nbsp;&nbsp;&nbsp;&nbsp; No. of user Rating Given :
                    <asp:Label ID="lbl_rating_Users" runat="server" Font-Bold="True" 
                        ForeColor="#FF3399"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    &nbsp;</td>
                <td align="center" class="style4" valign="middle">
                    <asp:Button ID="btn_submit_rating" runat="server" Text="Submit Rating" />
                </td>
                <td class="style5">
                    &nbsp;</td>
            </tr>
            </table>
    <br />
    <br />
    <asp:Label ID="lbl_error" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
    <br />
    <br /><br />


    <asp:Button ID="btn_BackToList" runat="server" Text="Go to List" />
    <br />

</asp:Content>
